<pro-header ></pro-header>
<nz-card [nzBordered]="false">

    <form nz-form [formGroup]="validateForm" (submit)="save()">

        <!--用户名-->
        <div nz-form-item nz-row>
            <div nz-form-label nz-col [nzSpan]="7">
                <label nz-form-item-required>教师名称</label>
            </div>

            <div nz-col [nzSpan]="12" nz-form-control nzHasFeedback>
                <input nz-input formControlName="userName" type="text" aria-placeholder="教师姓名" size="large"/>
                <!--<nz-input formControlName="userName" [nz]></nz-input>-->
            </div>
        </div>


        <div nz-form-item nz-row>
            <!--教龄-->
            <div nz-form-label nz-col [nzSpan]="7">
                <label nz-form-item-required>教龄</label>
            </div>

            <div nz-col [nzSpan]="2" nz-form-control>
                <nz-input-number formControlName="tyear" [nzMin]="1" [nzMax]="100" [nzStep]="1"
                                 [nzFormatter]="formatterYear" [nzParser]="parserYear"
                ></nz-input-number>
            </div>

            <!--驾龄-->
            <div nz-form-label nz-col [nzSpan]="3">
                <label nz-form-item-required>驾龄</label>
            </div>

            <div nz-col [nzSpan]="2" nz-form-control>
                <nz-input-number formControlName="dyear" [nzMin]="1" [nzMax]="100" [nzStep]="1"
                                 [nzFormatter]="formatterYear" [nzParser]="parserYear"
                ></nz-input-number>
            </div>

            <!--合格率-->
            <div nz-form-label nz-col [nzSpan]="3">
                <label nz-form-item-required>合格率</label>
            </div>

            <div nz-col [nzSpan]="2" nz-form-control>
                <nz-input-number formControlName="passper" [nzMin]="1" [nzMax]="100" [nzStep]="1"
                                 [nzFormatter]="formatterPercent" [nzParser]="parserPercent"></nz-input-number>
            </div>
        </div>

        <div nz-form-item nz-row [nzAlign]="'middle'" [nzType]="'flex'">
            <div nz-form-label nz-col [nzSpan]="7">
                <label nz-form-item>头像</label>
            </div>

            <div nz-col [nzSpan]="12" nz-form-control>
                <nz-upload class="avatar-uploader"
                           [nzAction]="uploadPath"
                           nzName="file"
                           nzFileType="image/png,image/jpeg,image/gif,image/bmp"
                           [nzShowUploadList]="false"
                           [nzBeforeUpload]="beforeUpload"
                           (nzChange)="handleChange($event)">
                    <i *ngIf="!avatarUrl" class="anticon anticon-plus avatar-uploader-trigger"></i>
                    <img *ngIf="avatarUrl" [src]="avatarUrl" class="avatar">

                    <!--{{avatarUrl}}-->
                </nz-upload>
            </div>
        </div>
        <!--简介-->
        <div nz-form-item nz-row [nzAlign]="'middle'" [nzType]="'flex'">
            <div nz-form-label nz-col [nzSpan]="7">
                <label nz-form-item>简介</label>
            </div>

            <div nz-col [nzSpan]="12" nz-form-control nzHasFeedback>
                <nz-input formControlName="content" [nzType]="'textarea'" [nzRows]="'4'" [nzPlaceHolder]="''"></nz-input>
            </div>
        </div>

        <!--保存-->
        <div nz-form-item nz-row>
            <div nz-col [nzSpan]="7"></div>
            <div nz-col [nzSpan]="12">
                <button nz-button class="save-form-button" [nzType]="'primary'" [nzSize]="'large'">保存</button>
            </div>
        </div>


    </form>


</nz-card>
